/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proms.net.modelo.comando;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import proms.net.modelo.dao.InterfaceClienteProcessoDAO;



public class ListaClientePro implements InterfaceComando {

	private InterfaceClienteProcessoDAO clienteProDAO;

	public ListaClientePro(InterfaceClienteProcessoDAO clienteProDAO) {
		this.clienteProDAO = clienteProDAO;
	}

	public String execute(HttpServletRequest request,
			HttpServletResponse response) {
		request.setAttribute("titulo", "Solutia PROMS");

		try {
			request.setAttribute("clientes", clienteProDAO.getClientes());
		} catch(Exception e) {
			request.setAttribute("mensagem", "Problemas com acesso a base de dados!");

		}

		return "home.jsp";
	}

}








